﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LimpaGaragem.BLL.User
{
    public class Rate
    {
        /// <summary>
        /// Return list of message from user
        /// </summary>
        /// <returns></returns>
        public List<LimpaGaragem.Model.User.Rate> GetListOfRatesFromUser(int IDUser)
        {
            try
            {
                return new LimpaGaragem.DAO.User.Rate().GetListOfRatesFromUser(IDUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Return list of message to user
        /// </summary>
        /// <returns></returns>
        public List<LimpaGaragem.Model.User.Rate> GetListOfRatesToUser(int IDUser)
        {
            try
            {
                return new LimpaGaragem.DAO.User.Rate().GetListOfRatesToUser(IDUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        /// <summary>
        /// Save rate
        /// </summary>
        public void SaveRate(int IDUserRated,
                            int IDUser,
                            int IDScoreRate)
        {
            try
            {
                new LimpaGaragem.DAO.User.Rate().SaveRate(IDUserRated, IDUser, IDScoreRate);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
